package com.lin.java.tool.oss.service;

import com.lin.java.tool.general.dao.po.SysFileEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author linjiang
 * @date 2024/7/28
 * @fn
 */
public interface OssService {

    /**
     * 普通文件上传
     *
     * @param file
     * @return
     * @throws Exception
     */
    SysFileEntity upload(MultipartFile file) throws Exception;

    /**
     * 文件下载
     *
     * @param fileId
     * @param response
     * @throws IOException
     */
    void download(Long fileId, HttpServletResponse response) throws IOException;
}
